-
Notifications
You must be signed in to change notification settings - Fork 3
feat(connectors): allow skipping OAuth with Esc key #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: pavelta-connectors-1
Are you sure you want to change the base?
Conversation
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.30-pr.217.2ff8369Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.30-pr.217.2ff8369"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.30-pr.217.2ff8369"
}
}
Preview published to npm registry — try new features instantly! |
Add connector resource module supporting 12 OAuth providers: googlecalendar, googledrive, gmail, googlesheets, googledocs, googleslides, slack, notion, salesforce, hubspot, linkedin, tiktok. - Zod discriminated union schema with type discriminator per provider - JSDoc links to official OAuth scope documentation for each provider - JSONC file reading with validation (filename must match type field) - API response schemas for upstream connector state - Unit tests with fixtures for valid, invalid, and mismatched connectors Part of: #184 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add API client methods for OAuth connector operations: - listConnectors: list all connectors for current app - syncConnector: sync connector with exact scope matching - getOAuthStatus: poll OAuth authorization status - removeConnector: remove a connector integration Also update response schemas and clean up verbose comments. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat(connectors): implement push logic for syncing connectors Add pushConnectors function that: - Syncs all local connectors via /sync endpoint - Removes upstream-only connectors not in local config - Returns typed results (synced, removed, needs_oauth, error) Includes unit tests covering all scenarios. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(connectors): add OAuth flow handling with browser redirect and polling (#192) * feat(connectors): add OAuth flow handling with browser redirect and polling Add runOAuthFlow function that: - Opens OAuth redirect URL in browser - Polls getOAuthStatus until ACTIVE or FAILED - Returns PENDING on timeout (5 minutes) Uses p-wait-for TimeoutError for robust timeout detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * connectors: base44 connectors push (#194) * final connector work sofi 1 * scopes --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change provider field from closed enum to flexible union that accepts both known providers (googlecalendar, notion, slack, etc.) and any arbitrary provider string. This enables users to configure custom OAuth providers without waiting for first-class Base44 support. Schema changes: - Add GenericConnectorSchema for arbitrary provider types - Update ConnectorResourceSchema to union of specific + generic schemas - Update IntegrationTypeSchema to accept known enum OR any non-empty string - Only reject empty strings Test coverage: - Verify known providers continue to work - Verify arbitrary providers are accepted - Verify empty strings are rejected - All 137 tests passing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
7bfb43f to
7b418ac
Compare
Override process.exit temporarily during the spinner to intercept Ctrl+C/Escape (which clack's block() converts to process.exit(0)), letting users skip individual connector authorizations instead of killing the entire process. Adds SKIPPED status to the summary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e304a12 to
3d50451
Compare
Code reviewFound 1 issue that needs attention: Issue: User instruction does not match actual behaviorLocation: The spinner message tells users to press Esc to skip: s.start(`Waiting for ${params.type} authorization... (Esc to skip)`);However, the actual skip mechanism works by intercepting Problem: When users press Esc (as instructed), nothing happens. They will be stuck waiting for the 2-minute timeout. Only Ctrl+C will trigger the skip. Suggested fix: Change the message to match the actual mechanism: s.start(`Waiting for ${params.type} authorization... (Ctrl+C to skip)`);References:
|
kfirstri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commented this in the parent PR #189
the entire pWaitFor should not be in the core/ folder.. and in this PR there's now also spinners and more stuff which core/ packages should not be familiar with.
0d6430f to
3fc2e0c
Compare
Note
Description
This PR enhances the OAuth authorization flow for connectors by allowing users to skip individual connector authorization with the Esc key (or Ctrl+C), rather than terminating the entire CLI process. This improves UX when pushing multiple connectors by letting users skip problematic ones and continue with the rest. The implementation works around a clack bug where block() calls process.exit(0) on cancel keys.
Related Issue
None
Type of Change
Changes Made
SKIPPEDstatus toOAuthFlowStatustyperunOAuthFlowtorunOAuthFlowWithSkipto reflect new skip capabilityprocess.exitoverride to intercept Esc/Ctrl+C and set skipped flag instead of killing the process@clack/promptsspinnerTesting
npm test)Checklist
Additional Notes
The implementation uses a temporary override of
process.exitto intercept the cancel signal from clack's block() function, which normally callsprocess.exit(0)directly instead of emitting SIGINT. This workaround ensures the spinner's cancellation is properly handled and the CLI can continue to the next connector instead of exiting entirely.🤖 Generated by Claude | 2026-02-10 15:22 UTC